from PySide2.QtWidgets import *
from PySide2.QtCore import Qt
from PySide2.QtCore import *
from PySide2.QtGui import *
from app.view import ViewFactory
from app.view import DialogFactory

def shift_shift():
    mainView:ViewFactory.MyMainView = ViewFactory.MyMainView.view_dict.get("myMainView")
    if mainView.view_dict.__contains__("shift_shift_dialog"):
        dialog:DialogFactory.ShiftShiftDialog =mainView.view_dict.get("shift_shift_dialog")
        dialog.exec()
    else:
        dialog = DialogFactory.ShiftShiftDialog(mainView)
        mainView.view_dict["shift_shift_dialog"] = dialog
        dialog.exec()
